﻿namespace Whse.Api.Services
{
    public interface IProductAppService : IAppService
    {
        [OperateLog(LogName = "创建商品")]
        Task<ProductVo> CreateAsync(ProductCreationDto input);

        [OperateLog(LogName = "更新商品")]
        Task<ProductVo> UpdateAsync(long id, ProductUpdationDto input);

        [OperateLog(LogName = "调整商品价格")]
        Task<ProductVo> ChangePriceAsync(long id, ProducChangePriceDto input);

        [OperateLog(LogName = "上架商品")]
        Task<ProductVo> PutOnSaleAsync(long id, ProductPutOnSaleDto input);

        [OperateLog(LogName = "下架商品")]
        Task<ProductVo> PutOffSaleAsync(long id, ProductPutOffSaleDto input);

        Task<PageModelVo<ProductVo>> GetPagedAsync(ProductSearchPagedDto search);

        Task<List<ProductVo>> GetListAsync(ProductSearchListDto search);
    }
}
